package de.schule.barnimgymnasium.javafx;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.effect.DropShadow;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class HelloBorderPane extends Application {

	@Override
	public void start(Stage primaryStage) throws Exception {
		BorderPane pane = new BorderPane();
		Text north = new Text("Oben");
		north.setFont(Font.font("Arial", 60));
		north.setEffect(new DropShadow(2, 3, 3, Color.RED));
		pane.setTop(north);
		Text west = new Text("Links");
		west.setFont(Font.font("Arial", 60));
		west.setEffect(new DropShadow(2, 3, 3, Color.RED));
		pane.setLeft(west);
		Text center = new Text("In der Mitte");
		center.setFont(Font.font("Arial", 60));
		center.setEffect(new DropShadow(2, 3, 3, Color.RED));
		pane.setCenter(center);
		Text east = new Text("Rechts");
		east.setFont(Font.font("Arial", 60));
		east.setEffect(new DropShadow(2, 3, 3, Color.RED));
		pane.setRight(east);
		Text south = new Text("Unten");
		south.setFont(Font.font("Arial", 60));
		south.setEffect(new DropShadow(2, 3, 3, Color.RED));
		pane.setBottom(south);
		primaryStage.setScene(new Scene(pane));
		primaryStage.show();
	}

	// @Override
	// public void start(Stage primaryStage) throws Exception {
	// BorderPane pane = new BorderPane();
	// pane.setTop(createText("Oben"));
	// pane.setLeft(createText("Links"));
	// pane.setCenter(createText("In der Mitte"));
	// pane.setRight(createText("Rechts"));
	// pane.setBottom(createText("Unten"));
	// primaryStage.setScene(new Scene(pane));
	// primaryStage.show();
	// }
	//
	// private Text createText(String text) {
	// Text ret = new Text(text);
	// ret.setFont(Font.font("Arial", 60));
	// ret.setEffect(new DropShadow(2, 3, 3, Color.RED));
	// return ret;
	// }

	public static void main(String[] args) {
		launch(args);
	}
}
